<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>淘宝数据同步接口文档</title>
<style type="text/css">
html, body, div,h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
margin: 0;
padding: 0;
font: 12px "宋体","Arial Narrow",HELVETICA;
}
h1{padding-left:5px;}
html {
color: #333;
}
li{padding:2px;line-height:18px;margin:0px 0px;}

a{color:#800000;}
a.v{color:#0000FF;text-decoration:none;}

.pms li span{color:#008000;font-weight:bold;margin-right: 5px;;}
li.a a.n {font-size: 14px;font-weight:bold;}
.notice{margin:10px;border:1px dotted #AAA;background-color:#FEF1DE;padding:5px;line-height: 18px;color:#333;}
.notice p{padding:2px 16px;}
.notice p span.t{display:block;padding:3px 0px;}
.r,.pms li span.r{color:red;font-weight:normal;font-size:12px;}
</style>
</head>
<body>
<h1>接口文档</h1>
<div class="notice">
	<b>访问方式：</b>
	<p>
		<span class="t">通过http访问接口提供地址，并以GET方式传递接口参数。接口代码以CODE={$code}方式传递</span>
		<a href="#">eg:</a>&nbsp;访问 AC01 接口。<br />
		&nbsp;&nbsp;&nbsp;&nbsp;http://api.be-ec.com/api.php?<span class="r">CODE=AC01</span>&<span class="r">ACCOUNT</span>=taobaoid&<span class="r">PASSWORD</span>=taobaopwd
	</p>
	<b>返回数据：</b>
	<p>
		<span class="t">默认返回json数据</span>
		返回json对象包含三个参数,{'<span class="r">data</span>':'mixed','<span class="r">status</span>':'int','<span class="r">message</span>':'string'}<br />
		&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">data:</a>&nbsp;接口操作返回的数据<br>
		&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">status:</a>&nbsp;接口操作的状态，0 操作失败，1 成功返回，2 操作异常。。<br>
		&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">message:</a>&nbsp;状态对应的文本说明
	</p>
</div>
<ul>
	<li class="a">
		<a href="#" class="n">AC01</a>&nbsp;&nbsp;淘宝账户授权并初始化订单操作 <a href="./index.php?CODE=AC01&ACCOUNT=vigorstar明星店" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string 淘宝店账户</li>
			<li><span>PASSWORD</span>string 淘宝店密码</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">AC02</a>&nbsp;&nbsp;更新淘宝店授权的session <a href="./index.php?CODE=AC02" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>visitor_nick</span>string 淘宝店账户</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">DB01</a>&nbsp;&nbsp;同步三个月前到现在的订单数据 <a href="./index.php?CODE=DB01&ACCOUNT=vigorstar明星店" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string base64转译后的淘宝店账户字符串</li>
			<li><span>RETURN</span>boolean 是否返回数据 默认false </li>
			<li><span>TIMESTART</span>datetime 同步开始时间点，如果为空则默认从最后一次同步结束时间点为本次开始时间点，如果本次同步时该账户的的第一次同步，则从三个月前为开始时间点。</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">DB02</a>&nbsp;&nbsp;订单确认发货 <a href="./index.php?CODE=DB02&ACCOUNT=vigorstar明星店&TID=125566973605978&SHIPPING_NO=0322218105&COMPANY_CODE=ZJS" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string base64转译后的淘宝店账户字符串</li>
			<li><span>TID</span>string(Number) 淘宝交易ID </li>
			<li><span>SHIPPING_NO</span>string 物流货运单号，如果为空，则启用虚拟发货即无物流单</li>
			<li><span>COMPANY_CODE</span>string 物流公司代码</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">DB03</a>&nbsp;&nbsp;主动关闭一笔订单 <a href="./index.php?CODE=DB03&ACCOUNT=vigorstar明星店" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string base64转译后的淘宝店账户字符串</li>
			<li><span>TID</span>string(Number) 淘宝交易ID </li>
			<li><span>REASON</span>string 关闭订单的原因 </li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">DB04</a>&nbsp;&nbsp;修改运费 <a href="./index.php?CODE=DB04&ACCOUNT=vigorstar明星店" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string base64转译后的淘宝店账户字符串</li>
			<li><span>TID</span>string(Number) 淘宝交易ID </li>
			<li><span>FEE</span>float 修改后的运费 </li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">DB05</a>&nbsp;&nbsp;同步指定订单号数据 <a href="./index.php?CODE=DB05&ACCOUNT=vigorstar明星店&TID=2147483647" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string base64转译后的淘宝店账户字符串</li>
			<li><span>TID</span>string(Number) 淘宝交易ID </li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">DB06</a>&nbsp;&nbsp;同步指定天的变化订单数据 <a href="./index.php?CODE=DB06&ACCOUNT=vigorstar明星店" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string 淘宝店账户</li>
			<li><span>DATE</span>date 指定时间 格式为：2012-10-01</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">PP01</a>&nbsp;&nbsp;初始化拍拍网的订单数据到本地，仅为近期3个月内的订单 <a href="./index.php?CODE=PP01&ACCOUNT=855010488" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>int 拍拍店铺绑定的QQ号码，为空则默认为应用申请的QQ号码</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">PP02</a>&nbsp;&nbsp;订单确认发货 <a href="./index.php?CODE=PP02&ACCOUNT=855010488&TID=125566973605978&SHIPPING_NO=0322218105&COMPANY_CODE=ZJS" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>int 拍拍店铺绑定的QQ号码，为空则默认为应用申请的QQ号码</li>
			<li><span>TID</span>string 订单编号 </li>
			<li><span>SHIPPING_NO</span>string 物流货运单号，如果为空，则启用虚拟发货即无物流单</li>
			<li><span>SHIPPING_NAME</span>string 物流公司名称，如：邮政EMS、申通快递、中通速递</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">PP03</a>&nbsp;&nbsp;主动关闭一笔订单 <a href="./index.php?CODE=PP03&ACCOUNT=855010488" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>int 拍拍店铺绑定的QQ号码，为空则默认为应用申请的QQ号码</li>
			<li><span>TID</span>string(Number) 淘宝交易ID </li>
			<li><span>REASON</span>string 关闭订单的原因 </li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">PP04</a>&nbsp;&nbsp;修改订单中的商品价格、或者修改运费价格 <a href="./index.php?CODE=DB04&ACCOUNT=855010488" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>int 拍拍店铺绑定的QQ号码，为空则默认为应用申请的QQ号码</li>
			<li><span>SUB_CODE</span>string 子订单(单品单)的编号 </li>
			<li><span>PRICE</span>float 修改后的价格（单位元，精确到分），留空不修改</li>
			<li><span>FEE</span>float 修改后的运费 （单位元，精确到分），留空不修改</li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">PP05</a>&nbsp;&nbsp;同步指定订单号数据 <a href="./index.php?CODE=PP05&ACCOUNT=855010488&TID=855010488-20120918-896777948" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>int 拍拍店铺绑定的QQ号码，为空则默认为应用申请的QQ号码</li>
			<li><span>TID</span>string 订单编号 </li>
		</ul>
	</li>
	
	<li class="a">
		<a href="#" class="n">PP06</a>&nbsp;&nbsp;同步指定天的变化订单数据 <a href="./index.php?CODE=PP06&ACCOUNT=855010488" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string 淘宝店账户</li>
			<li><span>DATE</span>date 指定时间,默认为当天日期 格式为：2012-10-01</li>
		</ul>
	</li>
	<li class="a">
		<a href="#" class="n">JD01</a>&nbsp;&nbsp;获取授权信息 <a href="./index.php?CODE=JD01&ACCOUNT=jd_xinhuihao" class="v" target="_blank">查看</a>
		<h3>参数：</h3>
		<ul class="pms">
			<li><span>ACCOUNT</span>string 淘宝店账户</li>
		</ul>
	</li>
	<li class="a"><a href="#" class="n">JD02</a>&nbsp;&nbsp;获取订单信息 
	<a href="./index.php?CODE=JD02&ACCOUNT=jd_xinhuihao" class="v" target="_blank">查看</a>
	<h3>参数：</h3>
	<ul class="pms">
		<li><span>ACCOUNT</span>string 淘宝店账户</li>
		<li><span>DATE</span>date 指定时间,默认为当天日期 格式为：2012-10-01</li>
	</ul></li>
	<li class="a"><a href="#" class="n">JD03</a>&nbsp;&nbsp;确认发货 
	<a href="./index.php?CODE=JD03&ACCOUNT=jd_xinhuihao" class="v" target="_blank">查看</a>
	<h3>参数：</h3>
	<ul class="pms">
		<li><span>ACCOUNT</span>string 淘宝店账户</li>
		<li><span>TID</span>string 订单编号 </li>
		<li><span>SHIPPING_NO</span>string 物流货运单号，如果为空，则启用虚拟发货即无物流单</li>
		<li><span>SHIPPING_ID</span>string 物流公司编号</li>
	</ul>
	</li>
</ul>
</body>
</html>